#@web_layout?()
#define css()
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/layer.css?#(getUUID())" />
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/main.css?#(getUUID())" />
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/admin/js/fancybox/source/jquery.fancybox.css?v=2.1.2" />
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/laypage.css?#(getUUID())" />

#end

#define content()
<div class="c-article" style="min-height:100%;">
    <div class="g-info">
        <div class="m-panel" style="margin-top:0;">
            <div style="width:100%;">
                <div class="m-row">
                    <div class="u-row-box">
                        <span style="color:#f97a5b;font-size:28px;">当前您的账户余额为:#(salary.fee()??'￥0')</span>
                    </div>
                    <div class="task-search-btn" style="border-radius:3px;" onclick="window.location.href='#(contextPath)/pay/accountCharge'">+点我为账户充值</div>
                </div>
            </div>
        </div>
    </div>
    <div class="g-task-detail-list">
        <table class="m-task-list" style="margin-top: 20px;padding-top: 0;">
            <thead>
                <tr>
                    <th width="10%">订单号</th>
                    <th width="25%">订单描述</th>
                    <th width="5%">金额</th>
                    <th width="10%">支付方式</th>
                    <th width="15%">创建时间</th>
                    <th width="5%">状态</th>
                    <th width="20%">操作</th>
                </tr>
            </thead>
            <tbody id="tbody"></tbody>
        </table>
        <div class="m-choice-page" id="m_choice_page_container"style="display:flex;justify-content:center">
        	<div id="m_choice_page">
        	</div>
        	<div id="jump">
        		<input type="text" size="5" maxlength="3" id="jumpVal" >
        		<button onclick=jump();>跳转</button>
        	</div>
        </div>
    </div>
</div>

<div id="payCode"  style="width:450px;text-align: center; display:none">
	<a href="#payCode" class="fancybox" id="payCodeTrigger" style="display:none">付款码</a>
	<p style="color:red">象漾账户充值微信付款码</p>
	<div id="qrcode"></div>
	<p style="color:grey">打开微信客户端扫二维码付款</p>
	<p style="color:red" id="result">等待付款...</p>
</div>
#end

#define script()
<script type="text/javascript" src="#(contextPath)/assets/admin/js/fancybox/lib/jquery-1.8.2.min.js"></script>
<script src="#(contextPath)/assets/front/web/script/pay/jquery.qrcode.js"></script>
<script type="text/javascript" src="#(contextPath)/assets/admin/js/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="#(contextPath)/assets/admin/js/fancybox/source/jquery.fancybox.js?v=2.1.3"></script>
<script src="#(contextPath)/assets/front/web/script/laypage.js" ></script>
<script src="#(contextPath)/assets/front/web/script/order_list.js" ></script>


<script type="text/javascript">
    var contextPath="#(contextPath)";
    var doaminurl = "#(domain)";
</script>

<script>
	$(document).ready(function(){
		$('.fancybox').fancybox();
		$("#payBtn").click(function(){
			var reg = /^[0-9]*[1-9][0-9]*$/;
			//输入的充值金额必须是整数并且大于1元
			var total_fee = $("#total_fee").val();
			if(!reg.test(total_fee)){
				layer.alert("请输入正确的充值金额,必须为整数，如:1000");
				return;
		    }
			
			if(parseInt(total_fee)<1){
				layer.alert("充值金额最小为1元");
				return;
		    }
			
			layer.confirm("确定需要为当前帐号进行充值操作么？", {
	            btn: ['确定充值','放弃充值'] //按钮
	        }, function(){
	        	layer.closeAll('dialog');
	        	$("#payCodeTrigger").trigger("click");
	        	$.ajax({
		            type:"POST",
		            url:"#(contextPath)/pay/wxQrCode",
		            data:{name:$("#featrue").val(),total_fee:1},
		            datatype: "JSON",
		            success:function(data){
		            	$('#qrcode').html("");
		            	$('#qrcode').qrcode({
		            		width: 150,
		            		height: 150,
		            		text: data.msg
		            	});         
		            },
				});
	        },function(){
	        	
	        });
        	
			
		})
	})
</script>

#end